import { BasicColumn } from '@/components/Table';
import { h } from 'vue';
import { NTag } from 'naive-ui';

export const columns: BasicColumn[] = [
  {
    title: '序号',
    key: 'id',
    align: "center",
  }, {
    title: '名称',
    key: 'title',
    align: "center",
  },
  {
    title: '类型',
    key: 'type',
    align: "center",
    render(row) {
      if (row.type == 1) {
        return h(
          NTag,
          {
            type: 'info',
          },
          {
            default: () => ('正常'),
          },
        );
      } else {
        return h(
          NTag,
          {
            type: 'info',
          },
          {
            default: () => ('堆叠'),
          },
        );
      }

    },
  },
];
